package com.duke.payphone;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import com.duke.payphone.acct.AccountEditActivity;
import com.duke.payphone.acct.CreditListActivity;
import com.duke.payphone.buy.BuyNewActivity;
import com.duke.payphone.sell.SellNewActivity;


/**
 * 
 * will give users the choice to buy, sell, logout, or edit their acct/credit
 * info
 * not too much logic here, just redirecting user
 * 
 * do not finish() this activity upon creation of new activity
 * 
 * Buttons: Buy (to buynew), Sell (to sellnew)
 * [Account] ()
 * 
 * - link to settings menu?
 * settings menu: account info, credit card mgmt, change pin, stay logged in
 * (box)
 * 
 * 
 * @author Michael
 * 
 */
public class RootActivity extends Activity {

    @Override
    public void onCreate (Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_root);
    }

    @Override
    public boolean onCreateOptionsMenu (Menu menu) {
        // getMenuInflater().inflate(R.menu.activity_root, menu);
        // return true;
        return false;
    }

    public void executeSell (View v) {
        Intent toSellNew = new Intent(this, SellNewActivity.class);
        startActivity(toSellNew);
    }

    public void executeBuy (View v) {
        Intent toBuyNew = new Intent(this, BuyNewActivity.class);
        startActivity(toBuyNew);
    }

    public void executeManageAccount (View v) {
        Intent toAccountEdit = new Intent(this, AccountEditActivity.class);
        startActivity(toAccountEdit);
    }

    public void executeManageCredit (View v) {
        Intent toCreditList = new Intent(this, CreditListActivity.class);
        startActivity(toCreditList);
    }

}
